package com.healthcloud.service.screening.impl;

import com.healthcloud.dao.screening.ScreeningBlDao;
import com.healthcloud.entity.screening.ScreeningBlEntity;
import com.healthcloud.entity.screening.ScreeningBlVo;
import com.healthcloud.service.screening.ScreeningBlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;

@Service("screeningBlService")
@Transactional
public class ScreeningBlServiceImpl implements ScreeningBlService {
	@Autowired
	private ScreeningBlDao screeningBlDao;
	
	@Override
	public ScreeningBlEntity queryObject(Integer id){
		return screeningBlDao.queryObject(id);
	}
	
	@Override
	public List<ScreeningBlEntity> queryList(ScreeningBlEntity bean, PageParam pageParam){
		return screeningBlDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(ScreeningBlEntity bean){
		return screeningBlDao.queryTotal(bean);
	}
	
	@Override
	public void save(ScreeningBlEntity screeningBl){
		screeningBlDao.save(screeningBl);
	}
	
	@Override
	public void update(ScreeningBlEntity screeningBl){
		screeningBlDao.update(screeningBl);
	}
	
	@Override
	public void delete(Integer id){
		screeningBlDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		screeningBlDao.deleteBatch(ids);
	}

	@Override
	public List<ScreeningBlVo> queryListVo(ScreeningBlVo entity, PageParam pageParam) {
		return screeningBlDao.queryListVo(entity, pageParam);
	}

	@Override
	public Integer queryTotalVo(ScreeningBlVo entity) {
		return screeningBlDao.queryTotalVo(entity);
	}

	@Override
	public void saveOrUpdate(ScreeningBlEntity entity) {
		if (entity.getId()!=null){
			update(entity);
		}else {
			save(entity);
		}
	}

}
